package ie.lawlor.amvc.controller;

import ie.lawlor.amvc.Triad;
import ie.lawlor.amvc.event.EventName;


public class RouteToChildEvent extends ControllerEventWrapper{
	
	protected String child;
	public RouteToChildEvent() {
		super();
	}
  public RouteToChildEvent(EventName applicationEvent, String child){
    super();
    this.applicationEvent = applicationEvent;
    this.child = child;
  }
  
	public void addToController(Controller controller){
	  controller.routeToChild(applicationEvent, child, override);
	}
	public String getChild() {
		return child;
	}
	
  public void setChild(String child) {
		this.child = child;
	}
  
  public void setChildTriad(Triad childTriad) {
    this.child = childTriad.getName();
  }
}